/**
 * 
 */
package com.lt.flashcard.view;

import java.util.List;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Path;
import org.zkoss.zk.ui.select.SelectorComposer;

import com.google.gdata.data.contacts.ContactEntry;

/**
 * @author Administrator
 *
 */
public class V_GmailContactListCtrl extends SelectorComposer<Component> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private List<ContactEntry> contacts;
	
	/* (non-Javadoc)
	 * @see org.zkoss.zk.ui.select.SelectorComposer#doBeforeComposeChildren(org.zkoss.zk.ui.Component)
	 */
	@Override
	public void doBeforeComposeChildren(Component comp) throws Exception {
		// TODO Auto-generated method stub
		Component com = Path.getComponent("//page_gmail_contacts/ctnGmailContacts");
		GmailContactsCtrl ctrl = (GmailContactsCtrl) com.getAttribute("$composer");
		contacts = ctrl.getContacts();
		super.doBeforeComposeChildren(comp);
	}

	/**
	 * @return the contacts
	 */
	public List<ContactEntry> getContacts() {
		return contacts;
	}

	/**
	 * @param contacts the contacts to set
	 */
	public void setContacts(List<ContactEntry> contacts) {
		this.contacts = contacts;
	}
}